package com.six666.medicaldevicetestingsystem.entity;
import lombok.Data;

@Data
public class BaseResponse<T> {
    // 业务状态码
    private int code;
    // 返回数据
    private T data;
    // 错误信息
    private String message;
    // 错误描述
    private String description;
    public BaseResponse(int code, T data, String message, String description) {
        this.code = code;
        this.data = data;
        this.message = message;
        this.description = description;
    }
    public BaseResponse(int code, T data) {
        this(code, data, "", "");
    }
    public BaseResponse(T data) {
        this(1, data, "", "");
    }
    public BaseResponse() {
        this(1, null, "", "");
    }
}
